(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/house/lethouse/detail" ], {
    "05b6": function(e, t, o) {
        (function(e) {
            o("767a"), n(o("66fd"));
            var t = n(o("5a14"));
            function n(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, e(t.default);
        }).call(this, o("543d").createPage);
    },
    "1e38": function(e, t, n) {
        (function(i) {
            function o(t, e) {
                var n, o = Object.keys(t);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(t), e && (n = n.filter(function(e) {
                    return Object.getOwnPropertyDescriptor(t, e).enumerable;
                })), o.push.apply(o, n)), o;
            }
            function s(e, t, n) {
                return t in e ? Object.defineProperty(e, t, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : e[t] = n, e;
            }
            Object.defineProperty(t, "__esModule", {
                value: !0
            });
            var e = {
                components: {
                    hosueYy: function() {
                        n.e("pages/house/components/house-yy").then(function() {
                            return resolve(n("95d2"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                data: function() {
                    var e = {
                        house: {},
                        topImgs: [],
                        isCollect: 0,
                        pics: [],
                        furnishs: [],
                        picList: [],
                        labels: [],
                        carouselIndex: 0,
                        carouselIndex2: 0,
                        roomList: []
                    };
                    return s(e, "furnishs", []), s(e, "furnishIndex", 0), s(e, "houseList", []), s(e, "community", {}), 
                    s(e, "isLoading", 1), s(e, "tools", this.$tools), s(e, "board", {}), s(e, "user", {}), 
                    s(e, "video_show", 0), s(e, "style", {
                        background: "#ffffff",
                        opacity: 0
                    }), s(e, "pageTitle", ""), s(e, "xcx_set", {}), s(e, "staff", {}), e;
                },
                computed: function(t) {
                    for (var e = 1; e < arguments.length; e++) {
                        var n = null != arguments[e] ? arguments[e] : {};
                        e % 2 ? o(Object(n), !0).forEach(function(e) {
                            s(t, e, n[e]);
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach(function(e) {
                            Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
                        });
                    }
                    return t;
                }({}, (t.default = void 0, n("26cb").mapState)({
                    isLogin: function(e) {
                        return e.user.isLogin;
                    },
                    basicSet: function(e) {
                        return e.init.basicSet;
                    },
                    platform_system: function(e) {
                        return e.init.platform_system;
                    },
                    loginUser: function(e) {
                        return e.user.loginUser;
                    }
                })),
                onLoad: function() {
                    var e, t, n = this.$Route.query;
                    n.scene ? (e = (t = decodeURIComponent(n.scene).split("-"))[0], t = t[1], this.houseId = e, 
                    t && i.setStorageSync("share_uid", t)) : (this.houseId = n.houseId, n.share_uid && i.setStorageSync("share_uid", n.share_uid)), 
                    this.getHouseDetail(), wx.canIUse("hideHomeButton") && wx.hideHomeButton(), wx.showShareMenu({
                        withShareTicket: !0,
                        menus: [ "shareAppMessage", "shareTimeline" ]
                    });
                },
                onReady: function() {},
                beforeRouteLeave: function(e, t, n) {
                    console.info("leave"), n();
                },
                methods: {
                    previewImage:function(e){
                      var dataset=e.currentTarget.dataset;
                      console.log('e的值',dataset);
                      wx.previewImage({
                        current: dataset.src, 
                        // 当前显示图片的链接，不填则默认为 urls 的第一张
                        urls: this.pics[0]['imgs']
                        // 需要预览的图片链接列表
                      })
                    },
                    adVideoInit: function() {
                        var t = this;
                        this.basicSet && this.basicSet.set.ad_video_id && wx.createRewardedVideoAd && (this.videoAd = wx.createRewardedVideoAd({
                            adUnitId: t.basicSet.set.ad_video_id
                        }), this.videoAd.onLoad(function() {
                            console.log("激励视频 广告加载成功");
                        }), this.videoAd.onError(function(e) {}), this.videoAd.onClose(function(e) {
                            e && e.isEnded || void 0 === e ? t.getTel() : i.showToast({
                                title: "观看完整视频广告，才能拨打电话",
                                icon: "none"
                            });
                        }));
                    },
                    pageScroll: function(e) {
                        var t = e.detail.scrollTop, e = 0, e = t < 200 ? t / 200 : 1;
                        this.style.opacity = e;
                    },
                    doPics: function(e) {
                        var o = [], i = [], t = [], s = 0;
                        e.forEach(function(e, n) {
                            t.push({
                                name: e.labelName,
                                num: e.imgs.length,
                                index: s
                            }), s += e.imgs.length, e.imgs.forEach(function(e, t) {
                                o.push({
                                    index: n,
                                    url: e
                                }), i.push(e);
                            });
                        }), this.topImgs = i, this.picList = o, this.labels = t;
                    },
                    openShare: function() {
                        this.isLogin ? (this.$refs.wkShare.show(), this.getPoster()) : this.$store.commit("LOGIN_TIP", !0);
                    },
                    handlePoster: function() {
                        this.$refs.wkShare.hide(), this.$refs.wkPainter.show();
                    },
                    getPoster: function() {
                        var t = this;
                        this.$api("poster.getLethouse", {
                            type: "lethouse",
                            houseId: t.house.id
                        }).then(function(e) {
                            0 == e.errno ? 0 == e.data.code ? t.board = e.data.obj : t.$tools.toast(e.data.msg) : t.$tools.toast(e.msg);
                        });
                    },
                    openVideo: function() {
                        this.video_show = 1, i.createVideoContext("video").play();
                    },
                    close_video: function() {
                        this.video_show = 0;
                    },
                    navToVr: function() {
                        var e = encodeURIComponent(this.house.vr_link);
                        this.$Router.push({
                            path: "/pages/index/web-view",
                            query: {
                                url: e
                            }
                        });
                    },
                    collect: function() {
                        var t = this, e = this.house.id;
                        this.isLogin ? t.$api("my.collect", {
                            hid: e,
                            type: 1
                        }, "post").then(function(e) {
                            0 === e.errno ? (e.data.code, t.$tools.toast(e.data.msg), t.isCollect = e.data.isCollect) : t.$tools.toast(e.msg);
                        }) : this.$store.commit("LOGIN_TIP", !0);
                    },
                    selectLabel: function(e) {
                        this.carouselIndex = this.labels[e].index;
                    },
                    selectFurnish: function(e) {
                        this.furnishIndex = e;
                    },
                    see: function() {
                        this.isLogin ? this.$refs.hosueYy.show(this.house.id) : this.$store.commit("LOGIN_TIP", !0);
                    },
                    nav_address: function(e) {
                        var t = parseFloat(this.house.lat), n = parseFloat(this.house.lng), o = this.house.address;
                        i.openLocation({
                            latitude: t,
                            longitude: n,
                            address: o,
                            name: o
                        });
                    },
                    roomDetail: function(e) {
                        this.$Router.push({
                            path: "/pages/house/lethouse/detail",
                            query: {
                                houseId: e
                            }
                        });
                    },
                    backHome: function() {
                        this.$Router.pushTab({
                            path: "/pages/index/index"
                        });
                    },
                    navtoCommunity: function() {
                        this.$Router.push({
                            path: "/pages/community/index",
                            query: {
                                communityId: this.community.id
                            }
                        });
                    },
                    navtoAgent: function() {
                        this.$Router.push({
                            path: "/pages/index/agent-detail",
                            query: {
                                user_id: this.house.uid
                            }
                        });
                    },
                    carouselChange: function(e) {
                        this.carouselIndex2 = e.detail.current;
                    },
                    call: function() {
                        var e, t = this;
                        this.isLogin ? 2 == (e = this.house.tel_type) ? this.videoAd ? this.videoAd.show().catch(function() {
                            t.videoAd.load().then(function() {
                                return t.videoAd.show();
                            }).catch(function(e) {
                                console.log("激励视频 广告显示失败"), t.getTel();
                            });
                        }) : t.getTel() : 3 == e ? this.vip.vip_name ? t.getTel() : i.showModal({
                            title: "提示",
                            content: "查看电话号码需办理会员",
                            confirmText: "办理",
                            success: function(e) {
                                if (e.confirm) t.$Router.push({
                                    path: "/pages/index/level-menu",
                                    query: {}
                                }); else if (e.cancel) return;
                            }
                        }) : 4 == e ? (e = t.house.tel_fee, i.showModal({
                            title: "提示",
                            content: "查看电话号码需付费：" + e + "元，已经付费用户不会重复扣费",
                            confirmText: "付费",
                            success: function(e) {
                                if (e.confirm) t.getTel(); else if (e.cancel) return;
                            }
                        })) : t.getTel() : this.$store.commit("LOGIN_TIP", !0);
                    },
                    getTel: function() {
                        var n = this;
                        i.showLoading({
                            title: "加载中"
                        }), n.$api("lethouse.get_tel", {
                            house_id: n.house.id,
                            house_type: "lethouse"
                        }).then(function(e) {
                            var t;
                            i.hideLoading(), 0 === e.errno ? 0 == e.data.code ? (t = e.data.tel, i.makePhoneCall({
                                phoneNumber: t
                            })) : 1 == e.data.code ? i.showModal({
                                title: "提示",
                                content: e.data.msg,
                                confirmText: "充值",
                                success: function(e) {
                                    if (e.confirm) n.$Router.push({
                                        path: "/pages/user/wallet/index",
                                        query: {}
                                    }); else if (e.cancel) return;
                                }
                            }) : 2 == e.data.code && n.$tools.toast(e.data.msg) : n.$tools.toast(e.msg);
                        });
                    },
                    getHouseDetail: function() {
                        var t = this;
                        t.$api("lethouse.lethouseDetail", {
                            houseId: t.houseId
                        }).then(function(e) {
                            0 == e.errno ? (t.house = e.data.house, t.user = e.data.user, t.isCollect = e.data.isCollect, 
                            t.pics = e.data.pics, t.furnishs = e.data.furnishs, t.roomList = e.data.roomList, 
                            t.community = e.data.community, e.data.staff && (t.staff = e.data.staff), t.pics && 0 < t.pics.length && t.doPics(t.pics), 
                            t.pageTitle = t.house.title, t.isLoading = 0, t.xcx_set = e.data.xcx_set, t.nearHouses(), 
                            2 == t.house.tel_type && t.adVideoInit()) : i.navigateBack({});
                        });
                    },
                    nearHouses: function() {
                        var t = this, e = t.house.lng, n = t.house.lat;
                        0 < e && 0 < n && t.$api("lethouse.nearHouses", {
                            lng: e,
                            lat: n,
                            house_id: t.house.id
                        }).then(function(e) {
                            0 == e.errno && (t.houseList = e.data.list);
                        });
                    },
                    onShareTimeline: function(e) {
                        return {
                            title: this.house.title,
                            imageUrl: this.house.cover || this.basicSet.default_img,
                            query: "houseId=" + this.house.id
                        };
                    },
                    onShareAppMessage: function(e) {
                        var t = this.house.title;
                        0 == this.loginUser.id && i.showToast({
                            title: "登陆之后转发，才会有记录的",
                            icon: "none"
                        });
                        t = {
                            title: t,
                            path: "/pages/house/lethouse/detail?houseId=" + this.house.id + "&share_uid=" + this.loginUser.id
                        };
                        return this.$refs.wkShare.hide(), t;
                    }
                }
            };
            t.default = e;
        }).call(this, n("543d").default);
    },
    "3d16": function(e, t, n) {
        n.r(t);
        var o, i = n("1e38"), s = n.n(i);
        for (o in i) "default" !== o && function(e) {
            n.d(t, e, function() {
                return i[e];
            });
        }(o);
        t.default = s.a;
    },
    "5a14": function(e, t, n) {
        n.r(t);
        var o, i = n("e89f"), s = n("3d16");
        for (o in s) "default" !== o && function(e) {
            n.d(t, e, function() {
                return s[e];
            });
        }(o);
        n("6215");
        var a = n("f0c5"), i = Object(a.a)(s.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        t.default = i.exports;
    },
    6215: function(e, t, n) {
        var o = n("b1ae");
        n.n(o).a;
    },
    b1ae: function(e, t, n) {},
    e89f: function(e, t, n) {
        n.d(t, "b", function() {
            return i;
        }), n.d(t, "c", function() {
            return s;
        }), n.d(t, "a", function() {
            return o;
        });
        var o = {
            wkNavbar: function() {
                return n.e("components/wk-navbar/index").then(n.bind(null, "88e0"));
            },
            wkNearMap: function() {
                return n.e("components/wk-near-map/index").then(n.bind(null, "9b1d"));
            },
            wkLethouses: function() {
                return n.e("components/wk-lethouses/index").then(n.bind(null, "295a"));
            },
            wkLoginModal: function() {
                return n.e("components/wk-login-modal/index").then(n.bind(null, "978a"));
            },
            wkSkeletons: function() {
                return n.e("components/wk-skeletons/index").then(n.bind(null, "5375"));
            },
            wkShare: function() {
                return n.e("components/wk-share/index").then(n.bind(null, "ed69"));
            },
            wkPainter: function() {
                return Promise.all([ n.e("common/vendor"), n.e("components/wk-painter/index") ]).then(n.bind(null, "57ed"));
            }
        }, i = function() {
            var o = this;
            o.$createElement;
            o._self._c, o._isMounted || (o.e0 = function(e, t) {
                var n = arguments[arguments.length - 1].currentTarget.dataset;
                return t = (n.eventParams || n["event-params"]).index, o.tools.previewImage(o.topImgs, t);
            });
        }, s = [];
    }
}, [ [ "05b6", "common/runtime", "common/vendor" ] ] ]);